<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>show_helper (Table::RTable)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File rtable.rb, line 206</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_helper</span> <span class="ruby-identifier">x</span>,<span class="ruby-identifier">y</span>
    <span class="ruby-identifier">str</span> = <span class="ruby-ivar">@rows</span>[<span class="ruby-identifier">x</span>][<span class="ruby-identifier">:cols</span>][<span class="ruby-identifier">y</span>]
    <span class="ruby-identifier">code</span> = <span class="ruby-value str">&quot;&quot;</span>
    <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@ansi</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-node">&quot;#{x}:#{y}&quot;</span>)
      <span class="ruby-identifier">code</span> = <span class="ruby-ivar">@ansi</span>[<span class="ruby-node">&quot;#{x}:#{y}&quot;</span>]
    <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@alias_format</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">==</span><span class="ruby-node">&quot;#{x}:#{y}&quot;</span>}
          <span class="ruby-identifier">cx</span>=<span class="ruby-ivar">@alias_format</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">==</span><span class="ruby-node">&quot;#{x}:#{y}&quot;</span>}[<span class="ruby-value">1</span>]
          <span class="ruby-identifier">cy</span>=<span class="ruby-ivar">@alias_format</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">==</span><span class="ruby-node">&quot;#{x}:#{y}&quot;</span>}[<span class="ruby-value">2</span>]
          <span class="ruby-identifier">code</span> = <span class="ruby-ivar">@ansi</span>[<span class="ruby-node">&quot;#{cx}:#{cy}&quot;</span>]
    <span class="ruby-keyword kw">end</span>
    [<span class="ruby-identifier">code</span>.<span class="ruby-identifier">to_s</span>,<span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-value str">&quot;\e[0m&quot;</span>]
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>